#pragma once

#include <QWidget>
#include <QPaintEvent>
#include <QPainter>
#include "CStoryCellData.h"
#include "ui_CStoryCellWidget.h"
#include "CConstant.h"

QT_BEGIN_NAMESPACE
namespace Ui { class CStoryCellWidgetClass; };
QT_END_NAMESPACE

class CStoryCellWidget : public QWidget
{
	Q_OBJECT

public:
	CStoryCellWidget(QWidget *parent = nullptr);
	~CStoryCellWidget();
	void SetUi(CStoryCellData* pStoryCellData);
private:
	Ui::CStoryCellWidgetClass *ui;
	CStoryCellData* m_pStoryCellData;

public:
	CStoryCellData* getStoryCellData() const
	{
		return m_pStoryCellData;
	}

private:
	virtual void mouseReleaseEvent(QMouseEvent* pQMouseEvent);
	virtual void paintEvent(QPaintEvent* pQPaintEvent);
signals:
	void StoryCellClick(CStoryCellData*);
};